#include<iostream>
#include<vector>
using namespace std;
int main(){
	int n,m;
	cin>>n>>m;
	vector<long long>a[n+1];
	for(int i=1;i<=n;++i){
		a[i].push_back(0);
		a[i].push_back(1);
	}
	for(int i=1;i<=n;++i){
		for(int j=2;j<=i;++j)
			a[i].push_back(a[i-1][j-1]+a[i-1][j]);
		a[i].push_back(1);
	}
	if(n==1&&m==1){
		cout<<1;
		return 0;
	}
	cout<<a[n-1][m];
	return 0;
}